package com.mini.cn.goods.servlet.ws.common;

import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;

/**
 * Created with IntelliJ IDEA.

 * User: fly
 * Date: 2018-09-16
 * Time: 上午2:17
 */
public class ResponseMap extends HashMap<String, Object> {

    /**
     *
     */
    private static final long serialVersionUID = 1L;


    public ResponseMap() {
        super();
        put(LCServiceConfig.LCErrorMsg.RECODEKEY, LCServiceConfig.LCErrorMsg.STATUS_OK);
        put(LCServiceConfig.LCErrorMsg.RETMSG, LCServiceConfig.LCErrorMsg.MSG_STATUS_OK);
    }

    public void setEorrInfo(int errCode, String errorMsg) {
        put(LCServiceConfig.LCErrorMsg.RECODEKEY, errCode);
        put(LCServiceConfig.LCErrorMsg.RETMSG, errorMsg);
    }

    public void setData(Object o) {
        put(LCServiceConfig.LCErrorMsg.DATA, o);
    }

    public static void main(String[] agrs) {
        System.out.println(JSONObject.toJSONString(new ResponseMap()));
    }

}
